bitkeeper revision 1.239 (3ec4fb8aMeMTm7_6dfdrGcBeicV-AQ)
authorkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>
Fri, 16 May 2003 14:54:02 +0000 (14:54 +0000)
committerkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>
Fri, 16 May 2003 14:54:02 +0000 (14:54 +0000)
kernel.c:
  Another minor cleanup of the console UDP code.

xen/common/kernel.c

index 8495d8b75e8b2850a34196b88eb25beb64bea752..3c92324ca15b8a0504ddba1f15461050e8572d80 100644 (file)
@@ -574,7 +574,7 @@ long do_console_write(char *str, unsigned int count)
 {
 #define SIZEOF_BUF 256
     unsigned char safe_str[SIZEOF_BUF];
-    unsigned char exported_str[SIZEOF_BUF];
+    unsigned char exported_str[SIZEOF_BUF+1];
     unsigned char dom_id[5];
     unsigned long flags;
     int i=0;
@@ -605,8 +605,8 @@ long do_console_write(char *str, unsigned int count)
     
     spin_unlock_irqrestore(&console_lock, flags);
     
-    exported_str[j]='\0';
-    console_export(exported_str, j-1);
+    exported_str[j++]='\0';
+    console_export(exported_str, j);
     
     return(0);
 }